/**
 * Copyright &copy; 2012-2016 <a href="https://www.kaaction.com">KAA</a> All rights reserved All rights reserved.
 */
package com.kaaction.modules.crab.entity;

import java.util.List;

import org.hibernate.validator.constraints.Length;

import com.google.common.collect.Lists;
import com.kaaction.common.persistence.DataEntity;

/**
 * 兑换券管理Entity
 * @author huanghaiming
 * @version 2017-07-19
 */
public class Coupon extends DataEntity<Coupon> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 兑换券名称
	private String productId;		// 商品id
	private String productName;		// 商品名称
	private String cardNumRule;		// 卡号规则
	private Double price;		// 价格
	private Integer num;		// 数量
	private Integer activateUserNum; // 激活使用数量
	private Integer unActivateUnUserNum; // 未激活未使用数量
	private Integer activateUnUserNum;	// 已激活已使用数量
	
	
	List<CrabProduct> crabProduct = Lists.newArrayList();
	
	public Coupon() {
		super();
	}

	public Coupon(String id){
		super(id);
	}

	@Length(min=1, max=32, message="兑换券名称长度必须介于 1 和 32 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getProductId() {
		return productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	@Length(min=1, max=255, message="商品名称长度必须介于 1 和 255 之间")
	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}
	
	@Length(min=1, max=16, message="卡号规则长度必须介于 1 和 16 之间")
	public String getCardNumRule() {
		return cardNumRule;
	}

	public void setCardNumRule(String cardNumRule) {
		this.cardNumRule = cardNumRule;
	}
	
	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public List<CrabProduct> getCrabProduct() {
		return crabProduct;
	}

	public void setCrabProduct(List<CrabProduct> crabProduct) {
		this.crabProduct = crabProduct;
	}

	public Integer getActivateUserNum() {
		return activateUserNum;
	}

	public void setActivateUserNum(Integer activateUserNum) {
		this.activateUserNum = activateUserNum;
	}

	public Integer getUnActivateUnUserNum() {
		return unActivateUnUserNum;
	}

	public void setUnActivateUnUserNum(Integer unActivateUnUserNum) {
		this.unActivateUnUserNum = unActivateUnUserNum;
	}

	public Integer getActivateUnUserNum() {
		return activateUnUserNum;
	}

	public void setActivateUnUserNum(Integer activateUnUserNum) {
		this.activateUnUserNum = activateUnUserNum;
	}

	
}